#ifndef ENTITY_H
#define ENTITY_H

#include "object.h"
#include <string>
#include <QString>

class Entity: public Object
{
    static int currentId;

protected:
    bool selectable;
    bool selected;
    bool movable;
    bool base;
    int team;
    int x, y, targX, targY, health;
    int width, height;
    int id;
    bool alive;

    QString dir;
public:
    Entity(int initX, int initY, bool ifmovable, bool ifbase);
    Entity();

    bool getSelected() {return selected;}
    void setSelected(bool sel) {selected = sel;}

    void setTarget(int tarX, int tarY) {targX = tarX; targY = tarY;}
    int getX() {return x;}
    int getY() {return y;}
    int getWidth() {return width;}
    int getHeight() {return height;}
    bool getMovable() {return movable;}
    bool getBase() {return base;}
<<<<<<< HEAD
    int getID() {return id;}
=======
    QString getDir() {return dir;}
>>>>>>> 66beb05a69caa3ac796c6c797228e76d059530d9

    void setTeam(int tm) {team = tm;}
    int getTeam() {return team;}

    void damage(int dmg){health -= dmg;}

    bool isAlive() {return alive;}

    virtual void update();
    void saveState();
    void load();
};


#endif // ENTITY_H
